<?php

namespace App\Domain\ChannelContact\Rules;

use Illuminate\Foundation\Http\FormRequest;

class UpdateChannelContractPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'contact_id' => 'required',
            'name' => '',
            'channel_name' => '',
            'channel_id' => '',
            'start_time' => '',
            'end_time' => '',
            'status' => '',
            'enclosure' => '',
            'signatory' => ''
        ];
    }

    public function messages()
    {
        return [
            'contact_id.required' =>'合同号必填',
            'name.' => '',
            'channel_name' => '',
            'channel_id' => '',
            'start_time' => '',
            'end_time' => '',
            'status' => '',
            'enclosure' => '',
            'signatory' => '',
        ];
    }
}
